<?php
declare(strict_types=1);
/**
 * MineAdmin is committed to providing solutions for quickly building web applications
 * Please view the LICENSE file that was distributed with this source code,
 * For the full copyright and license information.
 * Thank you very much for using MineAdmin.
 *
 * @Author X.Mo<root@imoi.cn>
 * @Link   https://gitee.com/xmo/MineAdmin
 */

namespace App\Box\Service;

use App\Box\Mapper\BoxProductMapper;
use Mine\Abstracts\AbstractService;

/**
 * 盒子关联产品服务类
 */
class BoxProductService extends AbstractService
{
    /**
     * @var BoxProductMapper
     */
    public $mapper;

    public function __construct(BoxProductMapper $mapper)
    {
        $this->mapper = $mapper;
    }
    public function save(array $data): int
    {
        return $this->mapper->saveData($data);
    }
    /**
     * 更新一条数据.
     */
    public function update(mixed $id, array $data): bool
    {
        return $this->mapper->updateData($id, $data);
    }
}